<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title>添加公告</title>

    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <!-- <script>
      (function () {
        if (window !== window.top) {
          window.top.location.href = 'http://www.818tu.com';
        }
      })();
    </script> -->

    <!-- bootstrap & fontawesome -->








    <!-- page specific plugin styles -->
    <script src="__PUBLIC__/admin/js/jquery.min.js"></script>
    <script src="__PUBLIC__/admin/js/lodash.min.js"></script>
    <script src="__PUBLIC__/admin/js/moment.min.js"></script>
    <script src="__PUBLIC__/admin/js/zh-cn.js"></script>
    <script src="__PUBLIC__/admin/js/numeral.min.js"></script>
    <script src="__PUBLIC__/admin/js/toastr.min.js"></script>
    <script src="__PUBLIC__/admin/js/cookies.js"></script>
    <script src="__PUBLIC__/admin/js/knockout-min.js"></script>
    <script src="__PUBLIC__/admin/js/knockout.mapping.min.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap-datetimepicker.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.unobtrusive.min.js"></script>
    <script src="__PUBLIC__/admin/js/clipboard.min.js"></script>
    <script src="__PUBLIC__/admin/js/select2.min.js"></script>
    <script src="__PUBLIC__/admin/js/admin.js"></script>
    <script>
      moment.locale('zh-cn');
      toastr.options.positionClass = 'toast-bottom-right';
    </script>

    <!-- text fonts -->


    <!-- ace styles -->


    <!--[if lte IE 9]>
        <link rel="stylesheet" href="http://novel.818tu.com/static/assets/css/ace-part2.min.css" />
    <![endif]-->




    <!--[if lte IE 9]>
        <link rel="stylesheet" href="http://novel.818tu.com/static/css/ace-ie.min.css" />
    <![endif]-->



    <!-- inline styles related to this page -->

    <!-- ace settings handler -->
    <script src="__PUBLIC__/admin/js/ace-extra.min.js"></script>

    <!-- <script>
      var __BASEURL = "http://novel.818tu.com/";
    </script> -->

<link media="all" href="__PUBLIC__/admin/css/index14.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/glyphicons-halflings-regular.css">
</head>
<body class="no-skin">

    <!-- #section:basics/navbar.layout -->
<include file="./Public/gong/title.html" />

    <div class="main-container" id="main-container">
      <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
      </script>

      <div id="sidebar" class="sidebar responsive">
          <script type="text/javascript">
            try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
          </script>

<include file="./Public/gong/list.html" />


          <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
          </div>

          <script type="text/javascript">
            try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
          </script>
      </div>

      <!-- /section:basics/sidebar -->
      <div class="main-content">


        <div class="breadcrumbs" id="breadcrumbs">
          <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
          </script>

          <ul class="breadcrumb">
            <li>
              <i class="ace-icon fa fa-home home-icon"></i>
              <a    href="__APP__/Home/Index/index.html">Home</a>
            </li>
            <li class="active">添加公告</li>
          </ul><!-- /.breadcrumb -->

          <!-- /section:basics/content.searchbox -->
        </div>

        <!-- /section:basics/content.breadcrumbs -->
        <div class="page-content">
          <div class="page-content-area">
            <div class="row">
              <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->

                <!--/span-->
                <!-- left menu ends -->



<div style="margin-bottom: 30px;">
    <ul class="nav nav-tabs">
        <li class="active"><a href="__URL__/add_news.html">添加公告</a></li>
    </ul>
</div>
<form id="main-form" class="form-horizontal"   method="POST" action="__URL__/do_add_news" enctype="multipart/form-data">

    <div class="form-group">
        <label class="control-label col-sm-3">公告标题</label>
        <div class="col-sm-9">
            <input name="title" class="col-sm-5 col-xs-10"  type="text" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3">可见对象</label>
        <div class="col-sm-9">
            <label class="radio-inline">
                <input name="show" checked="checked" type="radio"  value="0" checked="checked" />
                <span>所有人</span>
            </label>&nbsp;&nbsp;&nbsp;&nbsp;
            <label class="radio-inline">
                <input name="show"  type="radio"  value="1"  autocomplete="off">
                <span>一级代理</span>
            </label>&nbsp;&nbsp;&nbsp;&nbsp;
            <label class="radio-inline">
                <input name="show"  type="radio"  value="2"  autocomplete="off">
                <span>二级代理</span>
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3">公告内容</label>
        <div class="col-sm-9">
            <script id="editor" type="text/plain" name="content" style="width:830px;height:500px;"></script>
        </div>
    </div>

    <div class="clearfix form-actions">
        <div class="col-md-offset-3 col-md-9">
            <button type="submit" class="btn btn-info" data-bind="click: submit, disable: submitting">提交</button>
        </div>
    </div>
</form>


                                <!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div><!-- /.page-content-area -->
                </div><!-- /.page-content -->
            </div><!-- /.main-content -->

        </div><!-- /.main-container -->

        <!-- basic scripts -->

       <!--  <script type="text/javascript">
            if('ontouchstart' in document.documentElement) document.write("<script src='http://novel.818tu.com/static/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
        </script> -->
        <script src="__PUBLIC__/admin/js/bootstrap.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.webui-popover.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.ui.widget.min.js"></script>
        <script src="__PUBLIC__/admin/js/jquery.fileupload.min.js"></script>

        <!-- page specific plugin scripts -->

        <!-- ace scripts -->
        <script src="__PUBLIC__/admin/js/ace-elements.min.js"></script>
        <script src="__PUBLIC__/admin/js/ace.min.js"></script>

        <!-- inline scripts related to this page -->

        <!-- the following scripts are used in demo only for onpage help and you don't need them -->


       <!--  <script type="text/javascript"> ace.vars['base'] = 'http://novel.818tu.com/static'; </script> -->
        <script src="__PUBLIC__/admin/js/elements.onpage-help.js"></script>
        <script src="__PUBLIC__/admin/js/ace.onpage-help.js"></script>
    <!-- 文本编辑器部分 -->



<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>

<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>



<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->



<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->



<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">







    //实例化编辑器



    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例



    var ue = UE.getEditor('editor');











    function isFocus(e){



        alert(UE.getEditor('editor').isFocus());



        UE.dom.domUtils.preventDefault(e)



    }



    function setblur(e){



        UE.getEditor('editor').blur();



        UE.dom.domUtils.preventDefault(e)



    }



    function insertHtml() {



        var value = prompt('插入html代码', '');



        UE.getEditor('editor').execCommand('insertHtml', value)



    }



    function createEditor() {



        enableBtn();



        UE.getEditor('editor');



    }



    function getAllHtml() {



        alert(UE.getEditor('editor').getAllHtml())



    }



    function getContent() {



        var arr = [];



        arr.push("使用editor.getContent()方法可以获得编辑器的内容");



        arr.push("内容为：");



        arr.push(UE.getEditor('editor').getContent());



        alert(arr.join("\n"));



    }



    function getPlainTxt() {



        var arr = [];



        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");



        arr.push("内容为：");



        arr.push(UE.getEditor('editor').getPlainTxt());



        alert(arr.join('\n'))



    }



    function setContent(isAppendTo) {



        var arr = [];



        arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");



        UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);



        alert(arr.join("\n"));



    }



    function setDisabled() {



        UE.getEditor('editor').setDisabled('fullscreen');



        disableBtn("enable");



    }







    function setEnabled() {



        UE.getEditor('editor').setEnabled();



        enableBtn();



    }







    function getText() {



        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容



        var range = UE.getEditor('editor').selection.getRange();



        range.select();



        var txt = UE.getEditor('editor').selection.getText();



        alert(txt)



    }







    function getContentTxt() {



        var arr = [];



        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");



        arr.push("编辑器的纯文本内容为：");



        arr.push(UE.getEditor('editor').getContentTxt());



        alert(arr.join("\n"));



    }



    function hasContent() {



        var arr = [];



        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");



        arr.push("判断结果为：");



        arr.push(UE.getEditor('editor').hasContents());



        alert(arr.join("\n"));



    }



    function setFocus() {



        UE.getEditor('editor').focus();



    }



    function deleteEditor() {



        disableBtn();



        UE.getEditor('editor').destroy();



    }



    function disableBtn(str) {



        var div = document.getElementById('btns');



        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");



        for (var i = 0, btn; btn = btns[i++];) {



            if (btn.id == str) {



                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);



            } else {



                btn.setAttribute("disabled", "true");



            }



        }



    }



    function enableBtn() {



        var div = document.getElementById('btns');



        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");



        for (var i = 0, btn; btn = btns[i++];) {



            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);



        }



    }







    function getLocalData () {



        alert(UE.getEditor('editor').execCommand( "getlocaldata" ));



    }







    function clearLocalData () {



        UE.getEditor('editor').execCommand( "clearlocaldata" );



        alert("已清空草稿箱")



    }

</script>

</body>
</html>
